﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

namespace BarManager.Core.Entity
{
    [DataContract]
    public class Mesa
    {
        [DataMember]
        public int Id { get; set; }

        [Required]
        [DataMember]
        public int ZonaId { get; set; }

        [Required]
        [StringLength(50)]
        [DataMember]
        public string Nombre { get; set; }
           
        [DataMember]
        public bool Libre { get; set; }

        [DataMember]
        public virtual Zona Zona { get; set; }

        [DataMember]
        public virtual ICollection<Orden> OrdenList { get; set; }

        public Mesa()
        {
            Libre = true;
            OrdenList = new List<Orden>();
        }
    }
}
